<p class="galerie_titre_page">votre profil</p>

<div class="form" id="profilClient">
	<table id="profil_view">
		<tr>
			<td class="image" rowspan=6>
				<?php if(isset($model->user->urlImage)) { ?>
					<img src="<?php echo $model->user->urlImage ?>" alt="<?php echo $model->nom ?>" height="250px" width="250px"/></td>
				<?php }
					else { ?>
					<img src="images/profils/defaut.png" alt="<?php echo $model->nom ?>" height="250px" width="250px"/></td>
				<?php }?>
			<td class="label"><?php echo CHtml::encode($model->getAttributeLabel('nom')); ?></td>
			<td class="valeur">: <?php echo CHtml::encode($model->civilite)." ".CHtml::encode($model->nom)." ".CHtml::encode($model->prenom); ?></td>
		</tr>
		<tr>
			<td class="label"><?php echo CHtml::encode($model->getAttributeLabel('adresse')); ?></td>
			<td class="valeur">: <?php echo CHtml::encode($model->adresse); ?></td>
		</tr>
		<tr>
			<td class="label"><?php echo CHtml::encode($model->getAttributeLabel('codePostal')); ?></td>
			<td class="valeur">: <?php echo CHtml::encode($model->codePostal); ?></td>
		</tr>
		<tr>
			<td class="label"><?php echo CHtml::encode($model->getAttributeLabel('ville')); ?></td>
			<td class="valeur">: <?php echo CHtml::encode($model->ville); ?></td>
		</tr>
		<tr>
			<td class="label">Email</td>
			<td class="valeur">: <?php echo CHtml::encode($model->user->email); ?></td>
		</tr>
		<tr>
			<td class="label"><?php echo CHtml::encode($model->getAttributeLabel('tel')); ?></td>
			<td class="valeur">: <?php echo CHtml::encode($model->tel); ?></td>
		</tr>
		<tr>
			<td class="boutonProfil" colspan=3>
				<table>
					<tr>
						<td>
							<?php echo Chtml::form(array('/user/profile/edit'))?>
							<?php echo CHtml::submitButton('Editer mes informations personnelles'); ?>
							<?php echo Chtml::endForm()?>
						</td>
						<td>
							<?php echo Chtml::form(array('/user/profile/changepassword'))?>
							<?php echo CHtml::submitButton('Changer mon mot de passe'); ?>
							<?php echo Chtml::endForm()?>
						</td>
						<td>
							<?php if(isset($model->artiste)) {?>
								<?php echo Chtml::link(CHtml::button('Editer mon profil artiste'),$this->createUrl('/artiste/update',array("id"=>$model->id))); ?>
							<?php }
							else { ?>
								<?php echo Chtml::form(array('/artiste/create'))?>
								<?php echo CHtml::submitButton('Devenir artiste'); ?>
								<?php echo Chtml::endForm()?>
							<?php }?>
						</td>
						<td>
							<?php echo Chtml::form(array('/commande'))?>
							<?php echo CHtml::hiddenField("id_client",$model->id)?>
							<?php echo CHtml::submitButton('Mes commandes'); ?>
							<?php echo Chtml::endForm()?>
						</td>
					</tr>
				</table>
			</td>			
		</tr>
	</table>
</div>